Dialog System: What do I need to have for data? - The dialog - The choices/responses - If it triggers anything else - If the conversation should end Guide for using this dialog system: ---DIALOG FILE FORMAT--- '{}' Hold file variables such as the name of the speaker. '-' Indicates the start of a new dialog block '_' Indicates a choice given after the previous dialog block is shown. Choices are limited to 4 per dialog block. '[]' square brackets above a dialog block or choice hold parameters. These are outlined below in "DIALOG PARAMETERS". EXAMPLE: filename = Character's name *In the file* { name="John" } # this is just a comment so it won't be shown -Would you like to buy this item for 5 gold? [next=sold] _Yes please! [next=notake] _No thanks! # if the vender sold an item we should give it to the player [id=sold, req=gold take 5 > poorboy, end=true, checkpoint=allout, cmd=item g 0] -Wonderful! It's all yours! # if the player didn't want to take the item [id=notake, end=true] -Unfortunate... It's wonderful sword :( # if the player didn't have enough gold for the item [id=poorboy, end=true] -Aww come back when you have enough gold. # once the item is sold [id=allout, end=true] -Thanks again for buying that! *End of file* ---DIALOG PARAMETERS--- Parameters must be separated by a comma end (true, false) = false checkpoint (true, false, dialog ID, this) = false showName (true, false, any string) = true (WIP) next (Any dialog ID) mood (TBD) cmd (See COMMANDS & FORMAT below) req (Any commands. Only one instance of 'req' can exist in a single dialog) ---RICH TEXT FORMATTING--- Basic Text Formatting -Bold: bold text -Italic: italic text -Underline: underline text -Strikethrough: strikethrough text -Color: colored text or colored text -Font Size: text -Font Style: text -Line Height: text Color Tags -Color (Hex): red text -Color (Named): red text -Alpha (Hex): semi-transparent text Gradient Colors: -Horizontal: gradient text -Vertical: gradient text Alignment and Indentation -Alignment: --left aligned text --centered text --right aligned text --justified text -Indentation: indented text --Line Indentation: indented line Sprites and Icons -Sprite: -Sprite (index): Custom Tags and Additional Options -Lowercase: lowercase text -Uppercase: uppercase text -Smallcaps: small capitalized text -Monospace: monospace text -Kerning: kerning text -Mark: marked text -Cspace: character spacing ---COMMANDS & FORMAT--- Items in brackets within the syntax are adjustable parameters of the command. Do not keep the brackets. Group identifiers: - All available: a - Player: p - NonPlayer: e -Items- Give: Adds the item to the current player's item holder or drops it next to them. - Syntax: item give [itemID] [Optional extra item data] [Optional extra item data] - Syntax: item g [itemID] [Optional extra item data] [Optional extra item data] - Example (Giving a sword): item give 0 - Example (Giving a rage crystal): item g 3 crystalid:1 Take: Attempts to take an item matching the item id from the current player. - Syntax: item take [itemID] [Optional extra item data] [Optional extra item data] - Syntax: item t [itemID] [Optional extra item data] [Optional extra item data] - Example (Taking a sword): item take 0 - Example (taking a rage crystal): item t 3 crystalid:1 Forge: Spawns an item of given id at the given position.-----------------------------(WIP) - Syntax: forge [itemID] [X coord] [Y coord] [Optional extra item data] -Creatures- Birth: Spawns a creature of the given id at the given position.----------------------(WIP) - Syntax: birth [creatureID] [X coord] [Y coord] Heal: Heals the specified group by the given amount. - Syntax: heal [groupIdentifier] [integer amount] Damage: Damages the specified group by the given amount. - Syntax: hurt [groupIdentifier] [integer amount] Effect: Adds or removes an effect matching the given id from the specified group.----(WIP) - Syntax (Adding an effect): effect add [groupIdentifier] [effectID] [Optional extra data] - Syntax (Removing an effect): effect remove [groupIdentifier] [effectID] [Optional extra data] Has: Checks whether the player has either the effect or item matching the ID given - Syntax (Checking for an item): has item [ID] [Optional extra item data] - Syntax (Checking for an effect): has effect [ID] - Example (Checking for a rage crystal): has item 3 crystalid:1 -Misc- Change Scene: Initiates a scene change.----------------------------------------------(WIP) - Syntax: scene [sceneName or sceneBuildID] Quest Management: Progress or check the state of the quest matching the given id.--------------(WIP) - Syntax (Progressing a quest): quest [activate | a | complete | c | fail | f] [questID] - Syntax (Checking quest state): quest is [activated | a | completed | c | failed | f] [questID] Save Game: Saves the game. Functions as a spawn point.